package org.yellow.backend.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.yellow.backend.pojo.medicaltest;
import org.yellow.backend.service.medicaltestService;

/**
 * @author: hy
 * @create: 2024-01-01
 */
@RestController
@SuppressWarnings({"all"})
@RequestMapping("/medicaltest")
public class medicaltestController {
    @Autowired
    private medicaltestService service;
    @GetMapping("/{id}")
    public medicaltest getMedicalTest(@PathVariable("id") int id){
        return service.selectMedicaltestById(id);
    }
    @PostMapping("/insertTest")
    public boolean insertNewTest(@RequestBody medicaltest test){
        return service.insertNewTest(test);
    }
}
